package cn.lichenfei.fxui.examples;

import cn.lichenfei.fxui.common.FxUtil;
import cn.lichenfei.fxui.controls.CFCarousel;
import javafx.collections.FXCollections;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;

public class CFCarouselExample extends StackPane {

    CFCarousel cfCarousel;

    public CFCarouselExample() {
        cfCarousel = new CFCarousel(
                FXCollections.observableArrayList(
                        new ImageView(FxUtil.getImage("/img/img1.png")),
                        new ImageView(FxUtil.getImage("/img/img2.png")),
                        new ImageView(FxUtil.getImage("/img/img3.png")),
                        new ImageView(FxUtil.getImage("/img/img4.png")),
                        new ImageView(FxUtil.getImage("/img/img5.png"))
                ));
        getChildren().add(cfCarousel);
    }

}
